
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module file_reader.genome_file_reader</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="file_reader.html"><font color="#ffffff">file_reader</font></a>.genome_file_reader</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lc6/pygenome/src/file_reader/genome_file_reader.py">/home/lc6/pygenome/src/file_reader/genome_file_reader.py</a></font></td></tr></table>
    <p><tt>File&nbsp;reader&nbsp;module</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="file_reader.genome_file_reader.html#TextFileReader">TextFileReader</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TextFileReader">class <strong>TextFileReader</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Read&nbsp;text&nbsp;file&nbsp;and&nbsp;generate&nbsp;Cog&nbsp;model.<br>
The&nbsp;start_pos&nbsp;and&nbsp;end_pos&nbsp;columns&nbsp;are&nbsp;omitted<br>
Input&nbsp;format:&nbsp;reads_name&nbsp;start_position&nbsp;end_position&nbsp;start_pos&nbsp;end_pos&nbsp;e-value<br>
Example:<br>
gnl|ti|1565709966:0:0&nbsp;&nbsp;COG1438&nbsp;29&nbsp;&nbsp;64&nbsp;&nbsp;3&nbsp;38&nbsp;7.9e-08<br>
gnl|ti|1564540259:1:0&nbsp;&nbsp;COG1438&nbsp;33&nbsp;&nbsp;55&nbsp;&nbsp;3&nbsp;25&nbsp;2.9e-05<br>
gnl|ti|1565662757:4:0&nbsp;&nbsp;COG1438&nbsp;29&nbsp;&nbsp;58&nbsp;&nbsp;2&nbsp;31&nbsp;0.0001<br>
gnl|ti|1565771157:4:0&nbsp;&nbsp;COG1438&nbsp;29&nbsp;&nbsp;58&nbsp;&nbsp;2&nbsp;31&nbsp;0.0001<br>
gnl|ti|1565787164:4:0&nbsp;&nbsp;COG1438&nbsp;29&nbsp;&nbsp;58&nbsp;&nbsp;2&nbsp;31&nbsp;0.0001<br>
gnl|ti|1565699970:0:0&nbsp;&nbsp;COG1438&nbsp;29&nbsp;&nbsp;56&nbsp;&nbsp;3&nbsp;30&nbsp;0.00033<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TextFileReader-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Constructor</tt></dd></dl>

<dl><dt><a name="TextFileReader-generate_genome_record"><strong>generate_genome_record</strong></a>(self, line)</dt><dd><tt>Return&nbsp;a&nbsp;GenomeRecord&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;<br>
Arguments:<br>
-&nbsp;`line`:&nbsp;is&nbsp;a&nbsp;string</tt></dd></dl>

<dl><dt><a name="TextFileReader-generate_model"><strong>generate_model</strong></a>(self, file_path, cog_map)</dt><dd><tt>Create&nbsp;data&nbsp;model.<br>
&nbsp;<br>
Arguments:<br>
-&nbsp;`file_path`:&nbsp;the&nbsp;path&nbsp;of&nbsp;the&nbsp;data&nbsp;file<br>
-&nbsp;`cog_map`:&nbsp;is&nbsp;the&nbsp;cog&nbsp;family&nbsp;map</tt></dd></dl>

<dl><dt><a name="TextFileReader-read_file"><strong>read_file</strong></a>(self, file_path)</dt><dd><tt>Return&nbsp;a&nbsp;list&nbsp;of&nbsp;genome&nbsp;records<br>
&nbsp;<br>
Arguments:<br>
-&nbsp;`file_path`:&nbsp;the&nbsp;path&nbsp;of&nbsp;the&nbsp;data&nbsp;file</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>

<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'TextFileReader' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;(if&nbsp;defined)</tt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'Lei Chen &lt;hide1713@gmail.com&gt;'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Lei&nbsp;Chen&nbsp;&lt;hide1713@gmail.com&gt;</td></tr></table>
</body></html>